//
//  ArticleDetailHeaderView.m
//  Adorable_Things
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "ArticleDetailHeaderView.h"

@implementation ArticleDetailHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.headerImageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight / 3)];
        [self addSubview:self.headerImageV];
        
        self.dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.headerImageV.width / 2, self.headerImageV.bottom + 10, 60, 20)];
        [self addSubview:self.dateLabel];
        
        self.headerTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWidth / 8, self.dateLabel.bottom + 10, kWidth * 3 / 4, 30)];
        self.headerTitleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.headerTitleLabel];
        
        self.headerIntroLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, self.headerTitleLabel.bottom + 10, kWidth - 40, 150)];
        self.headerIntroLabel.numberOfLines = 0;
        [self addSubview:self.headerIntroLabel];
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
